<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic
  PUBLIC "-//OASIS//DTD DITA Composite//EN" "ditabase.dtd">
<topic id="topic1"><title id="az137232">ALTER TEXT SEARCH DICTIONARY</title><body><p
  id="sql_command_desc">Changes the definition of a text search dictionary.</p><section id="section2"><title>Synopsis</title></section>
    <codeblock id="sql_command_synopsis">ALTER TEXT SEARCH DICTIONARY <varname>name</varname> (
    <varname>option</varname> [ = <varname>value</varname> ] [, ... ]
)
ALTER TEXT SEARCH DICTIONARY <varname>name</varname> RENAME TO <varname>new_name</varname>
ALTER TEXT SEARCH DICTIONARY <varname>name</varname> OWNER TO <varname>new_owner</varname>
ALTER TEXT SEARCH DICTIONARY <varname>name</varname> SET SCHEMA <varname>new_schema</varname></codeblock><section id="section3"><title>Description</title>
      <p><codeph>ALTER TEXT SEARCH DICTIONARY</codeph> changes the definition of a text search
        dictionary. You can change the dictionary's template-specific options, or change the
        dictionary's name or owner.</p>
      <p>You must be the owner of the dictionary to use <codeph>ALTER TEXT SEARCH
          DICTIONARY</codeph>.</p></section><section id="section4"><title>Parameters</title>
      <parml>
        <plentry>
          <pt><codeph><varname>name</varname></codeph></pt>
          <pd>The name (optionally schema-qualified) of an existing text search dictionary.</pd>
        </plentry>
        <plentry>
          <pt><codeph><varname>option</varname></codeph></pt>
          <pd>The name of a template-specific option to be set for this dictionary.</pd>
        </plentry>
        <plentry>
          <pt><codeph><varname>value</varname></codeph></pt>
          <pd>The new value to use for a template-specific option. If the equal sign and value are
            omitted, then any previous setting for the option is removed from the dictionary,
            allowing the default to be used.</pd>
        </plentry>
        <plentry>
          <pt><codeph><varname>new_name</varname></codeph></pt>
          <pd>The new name of the text search dictionary.</pd>
        </plentry>
        <plentry>
          <pt><codeph><varname>new_owner</varname></codeph></pt>
          <pd>The new owner of the text search dictionary.</pd>
        </plentry>
        <plentry>
          <pt><codeph><varname>new_schema</varname></codeph></pt>
          <pd>The new schema for the text search dictionary.</pd>
        </plentry>
      </parml>
      <p>Template-specific options can appear in any order.</p>
            
</section><section id="section5">
      <title>Examples</title>
      <p>The following example command changes the stopword list for a Snowball-based dictionary.
        Other parameters remain unchanged.</p>
      <pre>ALTER TEXT SEARCH DICTIONARY my_dict ( StopWords = newrussian );</pre>
      <p>The following example command changes the language option to <codeph>dutch</codeph>, and
        removes the stopword option entirely.</p>
      <pre>ALTER TEXT SEARCH DICTIONARY my_dict ( language = dutch, StopWords );</pre>
      <p>The following example command "updates" the dictionary's definition without actually
        changing anything.</p>
      <pre>ALTER TEXT SEARCH DICTIONARY my_dict ( dummy );</pre>
      <p>(The reason this works is that the option removal code doesn't complain if there is no such
        option.) This trick is useful when changing configuration files for the dictionary: the
        ALTER will force existing database sessions to re-read the configuration files, which
        otherwise they would never do if they had read them earlier.</p>
    </section><section
          id="section6"><title>Compatibility</title><p>There is no <codeph>ALTER TEXT SEARCH
            DICTIONARY</codeph> statement in the SQL standard.</p></section><section
              id="section7"><title>See Also</title><p><codeph><xref
                href="./CREATE_TEXT_SEARCH_DICTIONARY.xml#topic1" type="topic" format="dita"
          /></codeph>, <codeph><xref href="./DROP_TEXT_SEARCH_DICTIONARY.xml#topic1" type="topic"
            format="dita"/></codeph></p></section></body></topic>
